home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
entrt101.zip
/
EIDEMO.PAS
next >
Wrap
Pascal/Delphi Source File
|
1993-04-22
|
4KB
|
133 lines
{$A+,B-,D-,E-,F-,I+,N-,O-,R+,S-,V+}
{$M 2048, 0,0}
program DemoEnterItUnit;
uses
Qwriter,
EnterIt;
var (* Test variables to get. *)
ShortVar : shortint;
ByteVar : byte;
IntVar : integer;
WordVar : word;
LongVar : longint;
RealVar : real;
StringVar : VidString;
BEGIN (* If Color video then clear the screen to deep blue. *)
if ColorMode then
ClearScr($17)
(* Else, clear the screen to black. *)
else
ClearScr($07);
(* Hide the cursor. *)
HideCursor(On);
(* Set ErrorMessage position and color. *)
InitErrorMess(26, 12, RevAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter a shortint between -10 and 35 :', 1,2, NormAttr);
ShortVar := EnterShort(-10,35, 3, 40,2, RevAttr);
Qwrite('ShortInt = ' + Int2Str(ShortVar, 5), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ', 1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter a byte between 25 and 75 : ', 1,2, NormAttr);
ByteVar := EnterByte(25,75, 3, 40,2, RevAttr);
Qwrite('Byte = ' + Int2Str(ByteVar, 5), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ', 1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter an integer between -500 and +500 : ', 1,2, NormAttr);
IntVar := EnterInt(-500,500, 4, 45,2, RevAttr);
Qwrite('Integer = ' + Int2Str(IntVar, 5), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ',
1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter a word between 2,500 and 3,500 : ', 1,2, NormAttr);
WordVar := EnterWord(2500,3500, 5, 42,2, RevAttr);
Qwrite('Integer = ' + Comma(Int2Str(WordVar, 5), 5), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ', 1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter a longint between -1,000 and +2,000 : ', 1,2, NormAttr);
LongVar := EnterLong(-1000,2000, 5, 47,2, RevAttr);
Qwrite('Longint = ' + Comma(Int2Str(LongVar, 5), 5), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ',
1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a number. *)
Qwrite(' Enter a Real between -25.50 and +50.20 : ', 1,2, NormAttr);
RealVar := EnterReal(-25.50, 50.20, 2, 7, 47,2, RevAttr);
Qwrite('Real = ' + Real2Str(RealVar, 7, 2), 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
Qwrite(' ',
1,2, NormAttr);
Qwrite(' ', 2,4, NormAttr);
(* Prompt the User for a string. *)
Qwrite(' Enter a single 15 char string : ', 1,2, NormAttr);
StringVar := EnterString(15, 45,2, RevAttr);
Qwrite('Your string was: ' + StringVar, 2,4, NormAttr);
(* Wait until the <ENTER> is pressed. *)
Pause(EnterKey);
(* Display the cursor again. *)
HideCursor(Off);
(* Clear the screen to black. *)
ClearScr($07)
END.